const path = require('path')
const { defineConfig } = require('vite')

module.exports = defineConfig({
  build: {
    target: 'es2018',
    lib: {
      entry: path.resolve(__dirname, 'src/index.js'),
      name: 'JmDraggable',
      fileName: (format) => `jm-draggable.${format}.js`
    },
    rollupOptions: {
      external: [],
      output: {
        globals: {
        }
      }
    }
  }
})